﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mscook.core.domain;

namespace mscook.core.services
{
    public interface ILoginUserService
    {
        void SaveOrUpdate(LoginUser loginUser);
        LoginUser Get(string id);
        void Delete(string id);
        LoginUser SelectLoginUserByLoginName(string loginName);
        LoginUser SelectLoginUserByLoginNameOrEmail(string loginName, string email);
        IList<LoginUser> SelectLimitLoginUserByType(bool isAnonymous, int start, int limit, out long total, System.Linq.Expressions.Expression<Func<LoginUser, bool>> expression);
        IList<LoginUser> SelectLimitSystemUser(bool isVip, int start, int limit, out long total, System.Linq.Expressions.Expression<Func<LoginUser, bool>> expression);//显示实现，只能通过接口调用
        /// <summary>
        ///Use 用户名 or Email 登录
        /// </summary>
        /// <param name="InputValue">用户的输入, UserName Or Email</param>
        /// <returns></returns>
        LoginUser UserLogOnSelectByLoginNameOrEmail(string InputValue);
        bool IsNullByLoginNameOrEmail(string loginName, string email);
        bool IsNullByLoginName(string loginName);
        bool IsNullByEmail(string email);
        bool ValidateLoginUserByPsd(string LoginName, string password);
    }
}
